<script id="messageTemp" type="text/x-kendo-template">
    <div id="messageDrawerView">
        <div id="messageDrawerContentView">
            <div class="hide">
                <div class="row no-gutters">
                    <div class="col-12" id="writeMailView">
                        <form class="mail-content">
                            <p>
                                <select class="w-100" id="msgReceiverView" name="receiver" multiple required data-required-msg="请选择收件人！"></select>
                                <span class="k-invalid-msg" data-for="receiver"></span>
                            </p>
                            <p>
                                <select class="w-100" id="msgCCView" name="cc" multiple></select>
                            </p>
                            <p>
                                <input class="k-textbox w-100" name="subject" type="text" placeholder="主题（必填）" required data-required-msg="请输入主题！">
                            </p>
                            <p>
                                <textarea class="k-textarea w-100" name="content" placeholder="正文内容"></textarea>
                            </p>
                            <div class="btns">
                                <button class="k-button k-button-icontext k-state-selected" type="button" onclick="sendMailView();"><i class="fas fa-paper-plane"></i>发送</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div>
                <div class="row no-gutters">
                    <div class="col-12" id="inboxToolbar"></div>
                    <div class="col-md-4 col-xl-3" id="inboxView"></div>
                    <div class="d-none d-md-block col-md-8 col-xl-9">
                        <div class="blank"></div>
                    </div>
                </div>
            </div>
            <div class="hide">
                <div class="row no-gutters">
                    <div class="col-12" id="outboxToolbar"></div>
                    <div class="col-md-4 col-xl-3" id="outboxView"></div>
                    <div class="d-none d-md-block col-md-8 col-xl-9">
                        <div class="blank"></div>
                    </div>
                </div>
            </div>
            <div class="hide"></div>
            <div class="hide">
                <div class="row no-gutters">
                    <div class="col-12" id="smsToolbar"></div>
                    <div class="col-md-4 col-xl-3" id="smsView"></div>
                    <div class="d-none d-md-block col-md-8 col-xl-9">
                        <div class="blank"></div>
                    </div>
                </div>
            </div>
            <div class="hide"></div>
            <div class="hide">
                <div class="row no-gutters">
                    <div class="col-12" id="addressBookToolbar"></div>
                    <div class="col-md-4 col-xl-3" id="addressBookView"></div>
                    <div class="d-none d-md-block col-md-8 col-xl-9">
                        <div class="blank"></div>
                    </div>
                </div>
            </div>
        </div>
        <div id="messageDrawerBtnView"><i class="fas fa-indent hide"></i></div>
    </div>
    <style scoped>
        .k-drawer-container {
            border: 1px solid #ccc;
            border-radius: 4px;
            background: #fff;
        }
        #messageDrawerView i,
        #messageDrawerContentView i,
        .k-window-content .mail-content i,
        .k-window-content .address-book-content button i {
            margin-right: 6px;
            width: 16px;
            height: 16px;
            font-size: 16px;
            line-height: 16px;
            text-align: center;
            vertical-align: middle;
        }
        #messageDrawerView {
            border-top-left-radius: 4px;
            border-bottom-left-radius: 4px;
            background: #e6e6e6;
            white-space: nowrap;
        }
        #messageDrawerView .k-drawer-item {
            align-items: center;
            position: relative;
            font-size: 14px;
        }
        #messageDrawerView .k-drawer-item i {
            margin: 0 12px 0 4px;
            min-width: 16px;
        }
        #messageDrawerView .k-drawer-item .badge {
            margin-left: 6px;
            font-weight: 100;
        }
        #messageDrawerView .k-drawer-item sup {
            display: inline-block;
            position: absolute;
            top: 8px;
            left: 8px;
            border-radius: 50%;
            width: 10px;
            height: 10px;
            background: #f35800;
        }
        #messageDrawerBtnView {
            display: flex;
            justify-content: center;
            align-items: center;
            position: absolute;
            left: 1px;
            bottom: 1px;
            width: 40px;
            height: 40px;
            cursor: pointer;
        }
        #messageDrawerBtnView i {
            margin: 0;
        }
        #messageDrawerContentView > div,
        #messageDrawerContentView > div > .row,
        #messageDrawerContentView > div .blank {
            height: 100%;
        }
        #messageDrawerContentView .k-toolbar {
            padding: 8px;
            border-top: 0;
            border-left: 0;
            border-right: 0;
            border-radius: 0 4px 0 0;
            height: 48px;
        }
        #messageDrawerContentView > div > .row > .col-md-4,
        #messageDrawerContentView > div > .row > .col-md-8 {
            height: calc(100% - 48px);
        }
        #messageDrawerContentView .k-toolbar .k-checkbox-label {
            margin-left: 4px;
            margin-right: 0;
        }
        #messageDrawerContentView .k-listview {
            border: 0;
            background: #eee;
            box-shadow: 1px 0 2px rgba(0, 0, 0, .1);
        }
        #messageDrawerContentView .k-listview .mail-list {
            padding: 8px 12px;
        }
        #messageDrawerContentView .k-listview .mail-list .k-checkbox-label {
            margin-right: 8px;
            vertical-align: -10%;
        }
        #messageDrawerContentView .k-listview .mail-list img {
            margin: 0 6px 5px 0;
            border: 1px solid #ccc;
            border-radius: 50%;
            width: 20px;
            height: 20px;
        }
        #messageDrawerContentView .k-listview .mail-list h5 {
            margin-bottom: 0;
            font-size: 14px;
            color: #bababa;
        }
        #messageDrawerContentView .k-listview .mail-list p {
            margin-bottom: 3px;
            font-size: 12px;
            color: #bababa;
        }
        #messageDrawerContentView .k-listview .mail-list time {
            font-size: 12px;
            color: #bababa;
        }
        #messageDrawerContentView .k-listview .unread h5 {
            color: #000;
        }
        #messageDrawerContentView .k-listview .unread p {
            color: #666;
        }
        #messageDrawerContentView .k-listview .unread time {
            color: #999;
        }
        #messageDrawerContentView .k-listview .k-state-selected h5,
        #messageDrawerContentView .k-listview .k-state-selected p,
        #messageDrawerContentView .k-listview .k-state-selected time {
            color: #000;
        }
        #messageDrawerContentView .k-listview .sms-list {
            display: flex;
            align-items: center;
            position: relative;
            padding: 8px 12px;
        }
        #messageDrawerContentView .k-listview .sms-list .k-checkbox-label {
            margin-right: 8px;
        }
        #messageDrawerContentView .k-listview .sms-list figure {
            flex: 0 0 44px;
            margin: 0;
            padding-right: 8px;
        }
        #messageDrawerContentView .k-listview .sms-list sup {
            display: inline-block;
            position: absolute;
            top: 1px;
            left: 33px;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 12px;
            line-height: 20px;
            text-align: center;
            transform: scale(0.8);
        }
        #messageDrawerContentView .k-listview .sms-list img {
            border-radius: 4px;
            width: 100%;
            box-shadow: 0 0 2px 1px rgba(0, 0, 0, .2);
        }
        #messageDrawerContentView .k-listview .sms-list > div {
            flex: auto;
        }
        #messageDrawerContentView .k-listview .sms-list h5 {
            margin-bottom: 2px;
            font-size: 14px;
            color: #000;
        }
        #messageDrawerContentView .k-listview .sms-list strong {
            display: inline-block;
            width: calc(100% - 36px);
            font-weight: normal;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }
        #messageDrawerContentView .k-listview .sms-list time {
            float: right;
            font-size: 12px;
            color: #999;
        }
        #messageDrawerContentView .k-listview .sms-list p {
            margin-bottom: 0;
            width: 80px;
            font-size: 12px;
            color: #999;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }
        #messageDrawerContentView .k-listview .address-book-list {
            padding: 8px 0;
        }
        #messageDrawerContentView .k-listview .address-book-list h4 {
            padding: 0 12px;
            font-size: 12px;
            color: #999;
        }
        #messageDrawerContentView .k-listview .address-book-list h5 {
            margin-bottom: 0;
            padding: 5px 12px;
            font-size: 12px;
            color: #000;
        }
        #messageDrawerContentView .k-listview .address-book-list h5:hover {
            background: #ddd;
            cursor: pointer;
        }
        #messageDrawerContentView .k-listview .address-book-list h5.k-state-selected {
            background: #ccc;
        }
        #messageDrawerContentView .k-listview .address-book-list .k-checkbox-label {
            margin-right: 8px;
            vertical-align: -25%;
        }
        #messageDrawerContentView .k-listview .address-book-list img {
            margin: 0 6px 0 0;
            border: 1px solid #ccc;
            border-radius: 50%;
            width: 30px;
            height: 30px;
        }
        #messageDrawerContentView .blank {
            display: flex;
            justify-content: center;
            align-items: center;
        }
        #messageDrawerContentView .mail-content {
            overflow: auto;
            padding: 10px 20px;
            height: 100%;
        }
        #messageDrawerContentView .mail-content h6,
        .k-window-content .mail-content h6 {
            line-height: 1.5;
        }
        #messageDrawerContentView .mail-content dl,
        .k-window-content .mail-content dl {
            margin-top: 10px;
            margin-bottom: 10px;
            border-top: 1px solid #ccc;
            border-bottom: 1px solid #ccc;
            padding-top: 5px;
            padding-bottom: 5px;
            font-size: 12px;
        }
        #messageDrawerContentView .mail-content dt,
        .k-window-content .mail-content dt {
            font-weight: normal;
            color: #999;
            text-align: right;
        }
        #messageDrawerContentView .mail-content dd > img,
        .k-window-content .mail-content dd > img {
            margin-right: 3px;
            border: 1px solid #ccc;
            border-radius: 50%;
            width: 12px;
            height: 12px;
            vertical-align: -10%;
        }
        #messageDrawerContentView .mail-content .btns,
        .k-window-content .mail-content .btns {
            margin-top: 10px;
            border-top: 1px solid #ccc;
            padding: 10px 5px;
            text-align: center;
        }
        #messageDrawerContentView .mail-content .btns button,
        .k-window-content .mail-content .btns button {
            margin: 0 10px;
        }
        #writeMailView {
            height: 100%;
        }
        #writeMailView .mail-content {
            padding: 20px;
        }
        #writeMailView .k-multiselect-wrap img {
            margin-right: 6px;
            border: 1px solid #ccc;
            border-radius: 50%;
            width: 20px;
            height: 20px;
        }
        #writeMailView textarea {
            height: 320px;
        }
        #writeMailView .mail-content .btns {
            margin-top: 0;
            border-top: 0;
        }
        #msgReceiverView-list li.k-item,
        #msgCCView-list li.k-item {
            white-space: nowrap;
        }
        #msgReceiverView-list li.k-item img,
        #msgCCView-list li.k-item img {
            margin-right: 6px;
            border: 1px solid #ccc;
            border-radius: 50%;
            width: 20px;
            height: 20px;
        }
        #msgReceiverView-list li.k-state-hover,
        #msgCCView-list li.k-state-hover {
            color: #656565;
            background: #eee;
        }
        #msgReceiverView-list li.k-state-selected,
        #msgCCView-list li.k-state-selected {
            color: #656565;
            background: #ddd;
        }
        #msgReceiverView-list li.k-state-focused,
        #msgCCView-list li.k-state-focused {
            box-shadow: none;
        }
        #smsChatView {
            border-top: 0;
            border-right: 0;
            border-bottom: 0;
            border-radius: 0 0 4px 0;
            max-width: none;
            background: #f4f4f4;
        }
        #smsChatView .k-message-list img {
            border: 1px solid #ccc;
        }
        #smsChatView .k-message-list time {
            color: #999;
        }
        #smsChatView .k-message-box {
            border-color: #ccc;
        }
        #messageDrawerContentView .address-book-content,
        .window-box .address-book-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100%;
            color: #fff;
        }
        #messageDrawerContentView .address-book-content figure,
        .window-box .address-book-content figure {
            position: absolute;
            width: 100%;
            height: 100%;
            margin: 0;
            background-repeat: no-repeat;
            background-size: cover;
            background-position: center;
            filter: blur(50px);
            opacity: .8;
        }
        #messageDrawerContentView .address-book-content img,
        .window-box .address-book-content img {
            position: relative;
            margin-bottom: 30px;
            width: 160px;
            height: 160px;
        }
        #messageDrawerContentView .address-book-content h5,
        .window-box .address-book-content h5 {
            position: relative;
            margin-bottom: 15px;
            font-size: 30px;
            font-weight: 100;
            opacity: .8;
        }
        #messageDrawerContentView .address-book-content h5 i,
        .window-box .address-book-content h5 i {
            margin: 0;
            width: 30px;
            height: 30px;
            font-size: 30px;
            line-height: 30px;
            text-align: center;
            vertical-align: -4%;
        }
        #messageDrawerContentView .address-book-content h6,
        .window-box .address-book-content h6 {
            position: relative;
            margin-bottom: 15px;
            font-size: 20px;
            font-weight: 100;
            opacity: .8;
        }
        #messageDrawerContentView .address-book-content p,
        .window-box .address-book-content p {
            position: relative;
            margin-bottom: 30px;
            font-size: 16px;
            font-weight: 100;
            opacity: .8;
        }
        #messageDrawerContentView .address-book-content .btns,
        .window-box .address-book-content .btns {
            position: relative;
            border-top: 1px solid rgba(255, 255, 255, .4);
            padding-top: 30px;
            width: 80%;
            text-align: center;
        }
        #messageDrawerContentView .address-book-content button,
        .window-box .address-book-content button {
            margin: 0 10px;
        }
        @media only screen and (max-width: 575px) {
            #messageDrawerContentView .k-toolbar .k-textbox {
                width: 120px;
            }
            #messageDrawerContentView .k-toolbar .k-overflow-anchor {
                width: 20px;
            }
            #messageDrawerContentView .k-listview .sms-list p {
                width: 200px;
            }
            .k-window .k-window-title img {
                border-radius: 50%;
                vertical-align: -20%;
            }
            .k-window .k-window-title strong {
                font-size: 14px;
                line-height: 20px;
                color: #000;
            }
            .k-window .k-window-title small {
                margin-left: 6px;
                color: #999;
            }
        }
        @media only screen and (min-width: 900px) {
            #messageDrawerContentView .k-listview .sms-list figure {
                flex: 0 0 64px;
            }
            #messageDrawerContentView .k-listview .sms-list p {
                width: auto;
                height: 34px;
                white-space: normal;
            }
        }
        @media only screen and (max-width: 425px) {
            #messageDrawerContentView .k-toolbar .k-textbox {
                width: 78px;
            }
        }
        .ids {
            z-index: 1;
            width: 16px;
            height: 16px;
            clip: auto;
            pointer-events: auto;
        }
    </style>
</script>